//
//  ZRRetweet.m
//  SinaByOC
//
//  Created by 张锐 on 16/3/21.
//  Copyright © 2016年 zhangr. All rights reserved.
//

#import "ZRRetweet.h"
#import <Masonry.h>

@interface ZRRetweet()

@property(nonatomic,strong) UILabel * retweetLabel;

@end

@implementation ZRRetweet

-(instancetype)init{

    self = [super init];
    
    if (self) {
        
        [self setupUI];
        
    }
    
    return self;
}

-(void)setupUI{
    
    self.backgroundColor = [[UIColor alloc]initWithWhite:237/255.0 alpha:1];
    
    [self addSubview:self.retweetLabel];
    
    [self.retweetLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(self.mas_top);
        
        make.left.equalTo(self.mas_left).offset(10);
        
        make.right.equalTo(self.mas_right).offset(-10);
        
        make.bottom.equalTo(self.mas_bottom);
        
    }];

}

-(UILabel *)retweetLabel{

    if (_retweetLabel == nil) {
        
        _retweetLabel = [[UILabel alloc]init];
        
        _retweetLabel.text = @"转发微博";
        
        _retweetLabel.font = [UIFont systemFontOfSize:14];
        
        _retweetLabel.numberOfLines = 0;
        
        _retweetLabel.textColor = [UIColor darkGrayColor];
    }
    
    return _retweetLabel;


}

-(void)setHomeCellModel:(ZRHomeCellModel *)homeCellModel{


    _homeCellModel = homeCellModel;
    
    self.retweetLabel.text = homeCellModel.retweeted_status.text;

}

@end
